import request from '@/utils/request'

export function http_myLogs(month) {
    return request({
        url: '/workdailyLog/myLog/list',
        method: 'get',
        params: {month}
    })
}


export function http_myLogs_info(proNo,date) {
    // console.log("proNo: ",proNo,"date: ",date)
    let params = {
        date, proNo
    }
    return request({
        url: "workdailyLog/myLog/detail",
        method: 'get',
        params: params,
    })
}


export function http_myLogs_export(beginMonth,endMonth,userId) {
    // console.log("userId:",userId)
    const baseUrl = process.env.VUE_APP_BASE_API
    window.location.href = baseUrl + '/workdailyLog/myLog/export?beginMonth='+beginMonth+'&endMonth='+endMonth+'&userId='+userId

    // window.location.href = 'http://localhost:9525/pro/workdailyLog/myLog/export?beginMonth=2020-05&endMonth=2020-12&userId=11232131232131'
    // return request({
    //     url: '/workdailyLog/myLog/export',
    //     method: 'get',
    //     params: {month:"2020-09"}
    // })
}
